package domain.model.project.support.projectscm;

import domain.model.project.ProjectSCM;
import domain.model.project.support.RWProjectSCM;
import shared.model.BuilderObject;

/**
 * @author Gregory Boissinot
 */
public class ProjectSCMBuilder implements BuilderObject<ProjectSCM> {

    private final RWProjectSCM projectSCM;

    public ProjectSCMBuilder(String scmConnection) {
        this.projectSCM = new ProjectSCMImpl();
        this.projectSCM.setScmConnection(scmConnection);
    }

    public ProjectSCMBuilder userName(String userName) {
        this.projectSCM.setPassword(userName);
        return this;
    }

    public ProjectSCMBuilder password(String password) {
        this.projectSCM.setPassword(password);
        return this;
    }

    @Override
    public ProjectSCM build() {
        return this.projectSCM;
    }
}
